From: Sebastian Keller Date: Sat, 11 Apr 2026 13:43:05 +0000 (+0200) Subject: signalTracker: Add debug function to get all signal trackers X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~10^2^2~63 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=fbd2b6b82305891b0f0f397adff11c109baad3d7;p=gnome-shell.git signalTracker: Add debug function to get all signal trackers Signal trackers have been the source of difficult to identify leaks in the past. Having access to the list of all active signal trackers at run time without having to modify and rebuild gnome-shell can be very valuable in identifying the source of these leaks, especially since the steps required to trigger a leak might not always be obvious. Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6423 Part-of: --- diff --git a/js/misc/signalTracker.js b/js/misc/signalTracker.js index 60991d404..2a3e2b6c7 100644 --- a/js/misc/signalTracker.js +++ b/js/misc/signalTracker.js @@ -272,3 +272,12 @@ export function registerDestroyableType(gtype) { destroyableTypes.push(gtype); } + +/** + * A debug function that can be used to inspect signal trackers at run time + * + * @returns {Map} + */ +export function debugGetSignalTrackers() { + return SignalManager.getDefault()._signalTrackers; +}